package com.loanapp.server.app.webapp.controller.bbs;


import com.loanapp.base.common.dto.ResponseDto;
import com.loanapp.base.controller.common.BaseController;
import com.loanapp.base.controller.constant.HystrixConstant;
import com.netflix.hystrix.contrib.javanica.annotation.HystrixCommand;
import com.netflix.hystrix.contrib.javanica.annotation.HystrixProperty;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("post")
@Api(value = "测试Swagger2", description = "测试Swagger2")
public class PostController extends BaseController {

//    @Autowired
//    private BwBorrowerApi borrowerApi;
//    @ApiOperation(value = "账号密码登录", notes = "",
//            produces = "application/json; charset=utf-8")
//    @ApiImplicitParams({
//            @ApiImplicitParam(name = "phone", value = "手机号",
//                    dataType = "int", paramType = "query", defaultValue = "", required = true),
//            @ApiImplicitParam(name = "pwd", value = "密码",
//                    dataType = "int", paramType = "query", defaultValue = "", required = true),
//    })
//    @RequestMapping(value = "list/{id}", method = RequestMethod.GET)
//    public ResponseDto getBorrower(@PathVariable Long id) {
//        ResponseDto<BwBorrower> result = ResponseDto.build("000", "");
//        try {
//            System.out.println(id);
//            BwBorrower bwBorrower = borrowerApi.test(id);
//            return result;
//        } catch (Exception e) {
//
//            return ResponseDto.build("111", "");
//        }
//    }
//
//    @ApiOperation(value = "账号密码登录", notes = "",
//            produces = "application/json; charset=utf-8")
//    @ApiImplicitParams({
//            @ApiImplicitParam(name = "phone", value = "手机号",
//                    dataType = "int", paramType = "query", defaultValue = "", required = true),
//            @ApiImplicitParam(name = "pwd", value = "密码",
//                    dataType = "int", paramType = "query", defaultValue = "", required = true),
//    })
//    @RequestMapping(value = "/test1", method = RequestMethod.GET)
//    public ResponseDto test(BwBorrowerQuery query) {
//        ResponseDto<BwBorrower> result = ResponseDto.build("000", "");
//        BwBorrower bwBorrower = borrowerApi.getBorrower(query);
//        result.setData(bwBorrower);
//        System.out.println(bwBorrower.getId());
//        return result;
//    }
}
